home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-11-23 | 1.6 KB | 62 lines | [TEXT/PJMM] |
- { © copyright 1991-93 UserLand Software, Inc. All RIghts Reserved. }
- { © copyright 1993 Peter N Lewis - converted to Pascal, 22/11/93 }
-
- unit MenuSharingToolKit;
-
- interface
-
- uses
- AppleEvents, Components;
-
- type
- tysharedmenurecord = record
- idmenu: integer;
- flags: integer; {flhierarchic,flinserted}
- hmenu: MenuHandle;
- end;
-
- tymenuarray = array[0..100] of tysharedmenurecord;
- ptrmenuarray = ^tymenuarray;
- hdlmenuarray = ^ptrmenuarray;
-
- tyMSerrordialog = ProcPtr;
- {procedure tyMSerrordialog(s:str255)}
-
- tyMSeventfilter = ProcPtr;
- {procedure tyMSeventfilter(var er:EventRecord);}
-
- type
- tyMSglobals = record
- severid: OSType;
- clientid: OSType;
- hsharedmenus: hdlmenuarray;
- fldirtysharedmenus: boolean;
- flscriptcancelled: boolean;
- flscriptrunning: boolean;
- flinitialized: boolean;
- idscript: longInt;
- menuserver: ComponentInstance;
- scripterrorcallback: tyMSerrordialog;
- eventfiltercallback: tyMSeventfilter;
- end;
-
- {$J+}
- var
- theitemMSglobals: tyMSglobals;
- {$J-}
-
- function InitSharedMenus (errordialog: tyMSerrordialog; eventfilter: tyMSeventfilter): boolean;
- function SharedMenuHit (themenu, theitem: integer): boolean;
- function SharedScriptRunning: boolean;
- function CancelSharedScript: boolean;
- function CheckSharedMenus (themenu: integer): boolean;
- function SharedScriptCancelled (event, reply: AppleEvent): boolean;
-
- function DisposeSharedMenus: boolean;
- function IsSharedMenu (themenu: integer): boolean;
- function EnableSharedMenus (enable: boolean): boolean;
- function RunSharedMenuItem (themenu, theitem: integer): boolean;
-
- implementation
-
- end.